<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<script>
function modalWin() {
	if (window.showModalDialog) {
		window.showModalDialog("xpopupex.htm","name",
		"dialogWidth:255px;dialogHeight:250px");
	} else {
		window.open('xpopupex.htm','name','height=255,width=250,toolbar=no,directories=no,status=no,
		continued from previous linemenubar=no,scrollbars=no,resizable=no ,modal=yes');
	}
}
</script>
<div>	
	<c:choose>	
	<c:when test="${articulos!=null}">
	
	<table cellspacing="0">					
		<thead>
			<tr>
				<th>Categoria</th>
				<th>Marca</th>
				<th>Nombre</th>
				<th>Precio</th>
				<th>Imagen</th>
				<th>Cantidad</th>
				<th>Detalle</th>
			</tr>
		</thead>
	
		<tbody>
		
		<c:forEach items="${articulos}" var="item">					
			<tr>
				<td>${item.categoria}</td>
				<td>${item.marca}</td>
				<td>${item.nombre}</td>
				<td>${item.precio}</td>
				<td><img class="fotoArticulo" src=${item.foto}></td>
				<td>
					<input type="number" class="cantidadArticulos" value="1"  idArticulo="${item.idProducto}">
					<input type="button" class="botonAgregarCarrito" idArticulo="${item.idProducto}">
				</td>
				<td><a href="xpopupex.htm" target="name" onclick="modalWin(); return false;">ver detalle</a></td>
			</tr>				
		</c:forEach>
		</tbody>
		<!-- Table Body -->
	</table>
	</c:when>	
	<c:otherwise>
    	No hay Articulos
	</c:otherwise>
</c:choose>
</div>